﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp9
{
    class Program
    {//定义一个员工类，存放用户的工号、姓名、性别、学历和部门信息；
     //定义两个构造函数:
     //一个是无参构造函数，学历默认为专科；
     //一个有参构造函数，根据参数对类的属性进行初始化。
        class Employment
        {
            public int Num;
            public string Name;
            public string Sex;
            public string Education;
            public string Part;

            public Employment()
            {
                Education = "专科";
            }
        //    public Employment(int Num, string Name, string Sex, string Education, string Part)
        //    {
        //        this.Num = Num;
        //        this.Name = Name;
        //        this.Sex = Sex;
        //        this.Education = Education;
        //        this.Part = Part;
        //    }
           public void print()
           {
               Console.WriteLine("我的号码是{0}，我的名字是{1}，我的性别是{2}，我的学历是{3}，我的部门是{4}",Num,Name,Sex,Education,Part);
           }
       }
       
        static void Main(string[] args)
        {
            Employment e = new Employment();
            e.Num = 1001;
            e.Name = "咱换个撒比";
            e.Sex = "男";
            //e.Education = "本科";
            e.Part = "设计部";
            e.print();
        }
    }

    
}
